/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package conductores;

/**
 *
 * @author marc
 */
public class Point {

    public int X;
    public int Y;

    public Point(int X, int Y) {
        this.X = X;
        this.Y = Y;
    }

    public int distancia(Point point1, Point point2){
        return java.lang.Math.abs(point1.X-point2.X) + java.lang.Math.abs(point1.Y-point2.Y);
    }

     public int distancia(Point point2){
        return distancia(this, point2);
     }

}
